/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package post;

/**
 *
 * @author Bryce
 */
public class CheckPayment extends IPayment{
    public CheckPayment(double amt){
        this.amount = amt;
        this.type = "CHECK";
    }
    
    @Override
    public String getPaymentType(){
        return this.type;
    }
    
    @Override
    public double getAmount(){
        return this.amount;
    }
    @Override
    public void setAmount(double amt){
        this.amount = amt;
    }
    
    @Override
    public String print() {
        return "Paid by Check";
    }

    @Override
    public boolean authorizePayment() {
        int RandomNum = (int)(Math.random()*10);
        if (RandomNum == 0)
            return false;
        else
            return true;
    }
    
}